﻿using PhuLeBussinessObject.Site;
using PhuLeDao.Site;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace PhuLeBooze.UICode
{
    public static class CConfigSiteEntity
    {
        public static string CompanyName { get; set; }
        public static string Address { get; set; }
        public static string Phone { get; set; }
        public static string Email { get; set; }
        public static string Copyright { get; set; }
        public static string EmailForward { get; set; }
        public static string ContactPurchases { get; set; }
        public static void ReadConfig()
        {
            CSiteDao siteDao = new CSiteDao();
            IList<CConfigSite> list = siteDao.GetConfigSite("<InputValue Context=\"GetSiteConfig\" />");
            if (list != null)
            {
                CompanyName = list[0].CompanyName;
                Address = list[0].Address;
                Phone = list[0].Phone;
                Email = list[0].Email;
                Copyright = list[0].Copyright;
                EmailForward = list[0].EmailForward;
                ContactPurchases = list[0].ContactPurchases;
            }
        }
    }
}